<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

    <title>订单明细</title>
    <link rel="stylesheet" type="text/css" href="/static/sysadm/css/base.css">
    <script type="text/javascript" src="/static/js/jquery/jquery-2.1.3.js"></script>
    <script type="text/javascript" src="/static/js/jquery.form.js"></script>
    <script type="text/javascript" src="/static/js/jquery.bootstrap.min.js"></script>
    <script type="text/javascript" src="/static/js/bootstrap.js"></script>

</head>
<body leftmargin="8" topmargin="8" background=''>


<!--  内容列表   -->
<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center"
       style="margin-top:8px">
    <tr bgcolor="#E7E7E7">
        <td height="30" background="" colspan="7">&nbsp;
            订单信息
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input type="button" value="返回"
                   onclick="window.location.href='/order_list'"/>
        </td>
    </tr>
</table>

<form id="editForm" action="/changeOrderStatus?id=${order.orderId}" method="post">
    <table width='98%' align="center" style="margin-top:8px">
        <tr bgcolor='#EEF4EA'>
            <td background='/static/images/wbg.gif' align='center' height="30px">
                基本信息
            </td>
        </tr>
    </table>
    <table width="98%">
        <tr>
            <td align="right" height="25px"><strong>订单号：</strong></td>
            <td align="left">${order.orderSn}</td>
            <td align="right"><strong>订单状态：</strong></td>
            <td align="left">

            ${order.orderStatus},
            ${order.payStatus},
            ${order.shippingStatus}


            </td>
        </tr>
        <tr>
            <td align="right" height="25px"><strong>购货人：</strong></td>
            <td align="left">${order.consignee}<!-- <a href="#">[ 显示购货人信息 ] </a><a href="#">[ 发送/查看留言 ]</a> --></td>
            <td align="right"><strong>下单时间：</strong></td>
            <td align="left">
                <script type="text/javascript">
                    var newTime = new Date(${order.addTime});
                    var momth = newTime.getMonth() + 1;
                    document.write(newTime.getFullYear() + "-" + momth + "-" + newTime.getDate() + " " + newTime.getHours() + ":" + newTime.getMinutes() + ":" + newTime.getSeconds());
                </script>
            </td>
        </tr>
        <tr>
            <td align="right" height="25px"><strong>支付方式：</strong></td>
            <td align="left">${order.payName}&nbsp;<input type="button" value="编辑"
                                                          style="height: 15px;cursor: pointer;display: none;"
                                                          onclick="toEditUI('pay')"/></td>
            <td align="right"><strong>付款时间：</strong></td>
            <td align="left">

                <script type="text/javascript">
                    var newTime = new Date(${order.payTime});
                    var momth = newTime.getMonth() + 1;
                    document.write(newTime.getFullYear() + "-" + momth + "-" + newTime.getDate() + " " + newTime.getHours() + ":" + newTime.getMinutes() + ":" + newTime.getSeconds());
                </script>
            </td>
        </tr>
        <tr>
            <td align="right" height="25px"><strong>配送方式：</strong></td>
            <td align="left">${order.shippingName}&nbsp;<input type="button" value="编辑"
                                                               style="height: 15px;cursor: pointer; display: none;"
                                                               onclick="toEditUI('shipping')"/></td>
            <td align="right"><strong>发货时间：</strong></td>
            <td align="left">
                <script type="text/javascript">
                    var newTime = new Date(${order.shippingTime});
                    var momth = newTime.getMonth() + 1;
                    document.write(newTime.getFullYear() + "-" + momth + "-" + newTime.getDate() + " " + newTime.getHours() + ":" + newTime.getMinutes() + ":" + newTime.getSeconds());
                </script>
            </td>
        </tr>
        <tr>
            <td align="right" height="25px"><strong>发货单号：</strong></td>
            <td align="left"><#--${order.invoiceNo==''?'暂无' : order.invoiceNo}--></td>
            <td align="right"><strong>订单来源：</strong></td>
            <td align="left">
                本站
            </td>
        </tr>


        <tr bgcolor='#EEF4EA' border='0' cellpadding='1' cellspacing='1'>
            <td background='/static/images/wbg.gif' align='center' height="30px" colspan="4">
                收货人信息&nbsp;<input type="button" value="编辑" style="height: 15px;cursor: pointer;"
                                  onclick="toEditUI('consignee')"/>
            </td>
        </tr>
        <tr>
            <td height="25px" align="right"><strong>收货人：</strong></td>
            <td height="25px" align="left">${order.consignee }</td>
            <td height="25px" align="right"><strong>电子邮件：</strong></td>
            <td height="25px" align="left">${order.email }</td>

        </tr>
        <tr>
            <td height="25px" align="right"><strong>地址：</strong></td>
            <td height="25px" align="left">${order.province }${order.city }${order.district }${order.address }</td>
            <td height="25px" align="right"><strong>邮编：</strong></td>
            <td height="25px" align="left">${order.zipcode }</td>

        </tr>
        <tr>
            <td height="25px" align="right"><strong>电话：</strong></td>
            <td height="25px" align="left">${order.tel}</td>
            <td height="25px" align="right"><strong>手机：</strong></td>
            <td height="25px" align="left">${order.mobile }</td>

        </tr>
        <tr>
            <td height="25px" align="right"><strong>标志性建筑：</strong></td>
            <td height="25px" align="left">${order.signBuilding }</td>
            <td height="25px" align="right"><strong>最佳送货时间：</strong></td>
            <td height="25px" align="left">${order.bestTime }</td>

        </tr>
    </table>
    <table width="98%">
        <tr bgcolor='#EEF4EA' border='0' cellpadding='1' cellspacing='1'>
            <td background='/static/images/wbg.gif' align='center' height="30px" colspan="7">
                商品信息&nbsp;<input type="button" value="编辑" style="height: 15px;cursor: pointer;"
                                 onclick="toEditUI('goods')"/>
            </td>
        </tr>

        <tr>
            <td height="25px" align="center"><strong>商品名称 </strong></td>
            <td height="25px" align="center"><strong>货号 </strong></td>
            <td height="25px" align="center"><strong>价格</strong></td>
            <td height="25px" align="center"><strong>数量</strong></td>
            <td height="25px" align="center"><strong>属性</strong></td>
            <td height="25px" align="center"><strong>库存</strong></td>
            <td height="25px" align="center"><strong>小计</strong></td>
        </tr>

    <#list goodsList as goods>
        <tr>
            <td height="25px" align="center">${goods.productName}</td>
            <td align="center">${goods.skuId }</td>
            <td align="center">￥${goods.productPrice }</td>
            <td align="center">${goods.productNumber}</td>
            <td align="center">参见商品详情</td>
            <td align="center">100+</td>
            <td align="center">￥
                <script type="text/javascript">
                    document.write(parseFloat(${goods.productNumber * goods.productPrice}).toFixed(2))
                </script>
                <input type="hidden" name="totalPrice"
                       value="${goods.productNumber * goods.productPrice}"/></td>
        </tr>
    </#list>
        <tr>
            <td height="25px" align="center"></td>
            <td height="25px" align="center"></td>
            <td height="25px" align="center"></td>
            <td height="25px" align="center"><strong>商品总重量：</strong></td>
            <td height="25px" align="center">
                500克
            </td>
            <td height="25px" align="center"><strong>合计：</strong></td>
            <td height="25px" align="center">
                <script type="text/javascript">
                    var total = 0
                    $("input[name='totalPrice']").each(function (i) {
                        total += ($(this).val() * 1);
                    })
                    document.write("￥" + parseFloat(total).toFixed(2));
                </script>
            </td>
        </tr>
    </table>
    <table width="98%">
        <tr bgcolor='#EEF4EA' border='0' cellpadding='1' cellspacing='1'>
            <td background='/static/images/wbg.gif' align='center' height="30px">
                费用信息&nbsp;<input type="button" value="编辑" style="height: 15px;cursor: pointer;"
                                 onclick="toEditUI('fee')"/>
            </td>
        </tr>
        <tr>
            <td align="right">
                商品总金额：￥${order.goodsAmount}元 - 折扣：￥${order.discount}元 + 发票税额：￥${order.tax}
                + 配送费用：￥${order.shippingFee}元 + 保价费用：￥${order.insureFee}元 + 支付费用：￥${order.payFee}元
                + 包装费用：￥${order.packFee}元 + 贺卡费用：￥${order.cardFee}元
            </td>
        </tr>
        <tr>
            <td align="right">
                = 订单总金额：￥${order.orderAmount}元
            </td>
        </tr>
        <tr>
            <td align="right">
                - 已付款金额：￥${order.moneyPaid}元 （使用积分： ￥${order.integralMoney}元 + 使用红包： ￥${order.bonus}元）
            </td>
        </tr>
        <tr>
            <td align="right">
                = 应付款金额：￥${order.surplus}元
            </td>
        </tr>
    </table>

    <input type="hidden" id="orderInfoId" value="${order.orderId}"/>

</form>
</body>
</html>
